```rs
fn main() {
- println!("Hello world!")
+ println!("Hello, world!")
}
```
```shell
$ ./target/hello_world
-Hello world!
+Hello, world!
```
We can also use `cargo run` to compile and then run it, all in one step:
<pre><code class="highlight"><span class="gp">$</span> cargo run
<span style="font-weight: bold"
-class="s1"> Fresh</span> hello-world v0.0.1 (file:///path/to/project/hello_world)
+class="s1"> Fresh</span> hello_world v0.0.1 (file:///path/to/project/hello_world)
<span style="font-weight: bold"
class="s1"> Running</span> `target/hello_world`
-Hello world!</code></pre>
+Hello, world!</code></pre>
You'll now notice a new file, `Cargo.lock`. It contains information about our
dependencies. Since we don't have any yet, it's not very interesting.
```toml
[package]
-name = "hello-world"
+name = "hello_world"
version = "0.0.1"
authors = ["Your Name <you@example.com>"]
<pre><code class="highlight"><span class="gp">$</span> cargo run
<span style="font-weight: bold" class="s1"> Compiling</span> color v0.0.1 (https://github.com/bjz/color-rs.git#bf739419)
-<span style="font-weight: bold" class="s1"> Compiling</span> hello-world v0.0.1 (file:///path/to/project/hello_world)
+<span style="font-weight: bold" class="s1"> Compiling</span> hello_world v0.0.1 (file:///path/to/project/hello_world)
<span style="font-weight: bold" class="s1"> Running</span> `target/hello_world`
Converting RGB to HSV!
HSV: HSV { h: 0, s: 1, v: 1 }</code></pre>
<span style="font-weight: bold"
class="s1"> Compiling</span> color v0.0.1 (https://github.com/bjz/color-rs.git#bf739419)
<span style="font-weight: bold"
-class="s1"> Compiling</span> hello-world v0.0.1 (file:///path/to/project/hello_world)
+class="s1"> Compiling</span> hello_world v0.0.1 (file:///path/to/project/hello_world)
<span style="font-weight: bold"
class="s1"> Running</span> target/test/hello_world-9c2b65bbb79eabce
```rs
fn main() {
- println!("Hello world!")
+ println!("Hello, world!")
}
```
```shell
$ ./target/hello_world
-Hello world!
+Hello, world!
```
We can also use `cargo run` to compile and then run it, all in one step:
<pre><code class="highlight"><span class="gp">$</span> cargo run
<span style="font-weight: bold"
-class="s1"> Fresh</span> hello-world v0.0.1 (file:///path/to/project/hello_world)
+class="s1"> Fresh</span> hello_world v0.0.1 (file:///path/to/project/hello_world)
<span style="font-weight: bold"
class="s1"> Running</span> `target/hello_world`
-Hello world!</code></pre>
+Hello, world!</code></pre>
# Going Further
```toml
[package]
-name = "hello-world" # the name of the package
-version = "1.0.0" # the current version, obeying semver
+name = "hello_world" # the name of the package
+version = "0.0.1" # the current version, obeying semver
authors = [ "you@example.com" ]
```